public class demo1 {
    public static void main(String[] args) {
        Thread thread = new MyThread();
        thread.start();

        while (true){
            System.out.println("正在执行主线程");
        }

    }
}

class MyThread extends Thread{
    @Override
    public void run() {
        while (true){
            System.out.println("正在执行 run 线程");
        }
    }
}
